﻿using MongoDB.Driver;
using Murry.DataStore;
using Murry.DataStore.MongoDB;

namespace Murry.DietTracker.Model.MongoDB
{
    /// <summary>
    /// MongoDB implementation of IDietaryReferenceIntake entity.
    /// </summary>
    public class DietaryReferenceIntake : MongoPersist, IDietaryReferenceIntake
    {
        /// <summary>
        /// Static constructor to add type to the map.
        /// </summary>
        static DietaryReferenceIntake()
        {
            Entities.AddEntity(typeof(MongoDataStore), typeof(IDietaryReferenceIntake), typeof(DietaryReferenceIntake));
        }

        /// <summary>
        /// Standard constructor.
        /// </summary>
        /// <param name="database">MongoDatabase Instance</param>
        internal DietaryReferenceIntake(MongoDatabase database)
            : base(database)
        {
        }

        /// <summary>
        /// Minimum age in years.
        /// </summary>
        public double MinAge { get; set; }

        /// <summary>
        /// Maximum age in years.
        /// </summary>
        public double MaxAge { get; set; }

        /// <summary>
        /// Gender Scope.
        /// </summary>
        public GenderScope GenderScope { get; set; }

        /// <summary>
        /// Pregnant.
        /// </summary>
        public PregnancyScope PregnancyScope { get; set; }

        /// <summary>
        /// Lactating.
        /// </summary>
        public LactatingScope LactatingScope { get; set; }

        /// <summary>
        /// Nutrient Name.
        /// </summary>
        public string NutrientName { get; set; }

        /// <summary>
        /// Amount.
        /// </summary>
        public double Amount { get; set; }

        /// <summary>
        /// Amount unit.
        /// </summary>
        public string Unit { get; set; }

        /// <summary>
        /// Amount unit category.
        /// </summary>
        public string UnitCategory { get; set; }
     }
}
